﻿using System;
using System.Threading;
using Mono.Collections.Generic;

namespace Mono.Cecil.Cil
{
	// Token: 0x02000146 RID: 326
	public sealed class AsyncMethodBodyDebugInformation : CustomDebugInformation
	{
		// Token: 0x17000328 RID: 808
		// (get) Token: 0x06000BFF RID: 3071 RVA: 0x000352BC File Offset: 0x000334BC
		// (set) Token: 0x06000C00 RID: 3072 RVA: 0x0000644A File Offset: 0x0000464A
		public InstructionOffset CatchHandler
		{
			get
			{
				return this.catch_handler;
			}
			set
			{
				this.catch_handler = value;
			}
		}

		// Token: 0x17000329 RID: 809
		// (get) Token: 0x06000C01 RID: 3073 RVA: 0x000352D4 File Offset: 0x000334D4
		public Collection<InstructionOffset> Yields
		{
			get
			{
				bool flag = this.yields == null;
				if (flag)
				{
					Interlocked.CompareExchange<Collection<InstructionOffset>>(ref this.yields, new Collection<InstructionOffset>(), null);
				}
				return this.yields;
			}
		}

		// Token: 0x1700032A RID: 810
		// (get) Token: 0x06000C02 RID: 3074 RVA: 0x0003530C File Offset: 0x0003350C
		public Collection<InstructionOffset> Resumes
		{
			get
			{
				bool flag = this.resumes == null;
				if (flag)
				{
					Interlocked.CompareExchange<Collection<InstructionOffset>>(ref this.resumes, new Collection<InstructionOffset>(), null);
				}
				return this.resumes;
			}
		}

		// Token: 0x1700032B RID: 811
		// (get) Token: 0x06000C03 RID: 3075 RVA: 0x00035344 File Offset: 0x00033544
		public Collection<MethodDefinition> ResumeMethods
		{
			get
			{
				Collection<MethodDefinition> result;
				if ((result = this.resume_methods) == null)
				{
					result = (this.resume_methods = new Collection<MethodDefinition>());
				}
				return result;
			}
		}

		// Token: 0x1700032C RID: 812
		// (get) Token: 0x06000C04 RID: 3076 RVA: 0x00035370 File Offset: 0x00033570
		public override CustomDebugInformationKind Kind
		{
			get
			{
				return CustomDebugInformationKind.AsyncMethodBody;
			}
		}

		// Token: 0x06000C05 RID: 3077 RVA: 0x00006454 File Offset: 0x00004654
		internal AsyncMethodBodyDebugInformation(int catchHandler) : base(AsyncMethodBodyDebugInformation.KindIdentifier)
		{
			this.catch_handler = new InstructionOffset(catchHandler);
		}

		// Token: 0x06000C06 RID: 3078 RVA: 0x0000646F File Offset: 0x0000466F
		public AsyncMethodBodyDebugInformation(Instruction catchHandler) : base(AsyncMethodBodyDebugInformation.KindIdentifier)
		{
			this.catch_handler = new InstructionOffset(catchHandler);
		}

		// Token: 0x06000C07 RID: 3079 RVA: 0x0000648A File Offset: 0x0000468A
		public AsyncMethodBodyDebugInformation() : base(AsyncMethodBodyDebugInformation.KindIdentifier)
		{
			this.catch_handler = new InstructionOffset(-1);
		}

		// Token: 0x0400076B RID: 1899
		internal InstructionOffset catch_handler;

		// Token: 0x0400076C RID: 1900
		internal Collection<InstructionOffset> yields;

		// Token: 0x0400076D RID: 1901
		internal Collection<InstructionOffset> resumes;

		// Token: 0x0400076E RID: 1902
		internal Collection<MethodDefinition> resume_methods;

		// Token: 0x0400076F RID: 1903
		public static Guid KindIdentifier = new Guid("{54FD2AC5-E925-401A-9C2A-F94F171072F8}");
	}
}
